<?php /* Smarty version Smarty-3.1.14, created on 2015-01-17 04:09:33
         compiled from "C:\xampp\htdocs\webnuochoa\app\View\QLSanPham\_form.tpl" */ ?>
<?php /*%%SmartyHeaderCode:2545154b9d26d13fa03-81098885%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '1b6f52658f50309ca9ecac44d7d9f0278baafc9f' => 
    array (
      0 => 'C:\\xampp\\htdocs\\webnuochoa\\app\\View\\QLSanPham\\_form.tpl',
      1 => 1421389422,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '2545154b9d26d13fa03-81098885',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'loaiForm' => 0,
    'thongTinSP' => 0,
    'dsGioiTinh' => 0,
    'key' => 0,
    'value' => 0,
    'dsNSX' => 0,
    'dsTrangThai' => 0,
    'this' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.14',
  'unifunc' => 'content_54b9d26d25fd76_70482013',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_54b9d26d25fd76_70482013')) {function content_54b9d26d25fd76_70482013($_smarty_tpl) {?><div id="box3_1">
	<?php if ($_smarty_tpl->tpl_vars['loaiForm']->value=='them'){?>
		<form class="themsp" action="<?php echo Router::url('/',true);?>
quan_tri/san_pham/them_moi/" method="post"  enctype="multipart/form-data">
	<?php }else{ ?>
		<form class="themsp" action="<?php echo Router::url('/',true);?>
san_pham/sua?id_sp=<?php echo $_smarty_tpl->tpl_vars['thongTinSP']->value['SanPhamModel']['id_sp'];?>
" method="post"  enctype="multipart/form-data">
	<?php }?>	
		<h1 class="h1tracuu">Thêm sản phẩm</h1>
		<a class="teninput">Mã sản phẩm</a>
		<input type="text" class="form-control input_tracuu" placeholder="Mã sản phẩm" name="ma_sp" value="<?php echo $_smarty_tpl->tpl_vars['thongTinSP']->value['SanPhamModel']['ma_sp'];?>
" maxlength="10">
		<a class="teninput">Tên sản phẩm</a>
		<input type="text" class="form-control input_tracuu" placeholder="Tên sản phẩm" name="ten_sp" value="<?php echo $_smarty_tpl->tpl_vars['thongTinSP']->value['SanPhamModel']['ten_sp'];?>
" maxlength="255">
		<a class="teninput">Giới tính</a>
		<select class="form-control input_tracuu" name="gioi_tinh">
			<option value="">Giới tính</option>
			<?php  $_smarty_tpl->tpl_vars['value'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['value']->_loop = false;
 $_smarty_tpl->tpl_vars['key'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['dsGioiTinh']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['value']->key => $_smarty_tpl->tpl_vars['value']->value){
$_smarty_tpl->tpl_vars['value']->_loop = true;
 $_smarty_tpl->tpl_vars['key']->value = $_smarty_tpl->tpl_vars['value']->key;
?>
				<option value="<?php echo $_smarty_tpl->tpl_vars['key']->value;?>
" <?php echo $_smarty_tpl->tpl_vars['value']->value['checked'];?>
><?php echo $_smarty_tpl->tpl_vars['value']->value['value'];?>
</option>
            <?php } ?>
		</select>
		<a class="teninput">Chọn nhà sản xuất</a>
		<select class="form-control input_tracuu" name="id_nsx">
			<option value="">Nhà sản xuất</option>
			<?php  $_smarty_tpl->tpl_vars['value'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['value']->_loop = false;
 $_smarty_tpl->tpl_vars['key'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['dsNSX']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['value']->key => $_smarty_tpl->tpl_vars['value']->value){
$_smarty_tpl->tpl_vars['value']->_loop = true;
 $_smarty_tpl->tpl_vars['key']->value = $_smarty_tpl->tpl_vars['value']->key;
?>
				<option value="<?php echo $_smarty_tpl->tpl_vars['key']->value;?>
" <?php echo $_smarty_tpl->tpl_vars['value']->value['checked'];?>
><?php echo $_smarty_tpl->tpl_vars['value']->value['value'];?>
</option>
	        <?php } ?>
		</select>
		<a class="teninput">Từ khóa</a>
		<input type="text" class="form-control input_tracuu" placeholder="Từ khóa" name="tu_khoa" value="<?php echo $_smarty_tpl->tpl_vars['thongTinSP']->value['SanPhamModel']['tu_khoa'];?>
" maxlength="512">

		<a class="teninput">Trạng thái :</a>
		<?php  $_smarty_tpl->tpl_vars['value'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['value']->_loop = false;
 $_smarty_tpl->tpl_vars['key'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['dsTrangThai']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['value']->key => $_smarty_tpl->tpl_vars['value']->value){
$_smarty_tpl->tpl_vars['value']->_loop = true;
 $_smarty_tpl->tpl_vars['key']->value = $_smarty_tpl->tpl_vars['value']->key;
?>
			<label class="tentt" for="trang_thai_<?php echo $_smarty_tpl->tpl_vars['key']->value;?>
"><?php echo $_smarty_tpl->tpl_vars['value']->value['value'];?>
</label>
			<input type="radio" name="trang_thai" id="trang_thai_<?php echo $_smarty_tpl->tpl_vars['key']->value;?>
" value="<?php echo $_smarty_tpl->tpl_vars['key']->value;?>
" <?php echo $_smarty_tpl->tpl_vars['value']->value['checked'];?>
>
        <?php } ?>
		<br>

		<a class="teninput">Mô tả tóm tắt :</a>
		<textarea class="form-control texttomtat" name="mo_ta_ngan" rows="4" cols="50"  maxlength="2000"><?php echo $_smarty_tpl->tpl_vars['thongTinSP']->value['SanPhamModel']['mo_ta_ngan'];?>
</textarea>
		
		<a class="teninput">Hình ảnh :</a>
		<?php if ($_smarty_tpl->tpl_vars['thongTinSP']->value['SanPhamModel']['hinh_anh']){?>
		<div style="width:165px; height:115px;">
			<?php echo $_smarty_tpl->tpl_vars['this']->value->Html->image("hinhsp/".((string)$_smarty_tpl->tpl_vars['thongTinSP']->value['SanPhamModel']['hinh_anh']),array('class'=>"hinhsp"));?>

		</div>
		<?php }?>
		<input class="nutup" type="file" name="hinh_anh">
		<br>
		<button type="submit" class="but but-default but-sm nut_tracuu">
			<span class="icon icon-plus"></span> Thêm sản phẩm
		</button>
	</form>
	<div class="box_sp_tomtat">
		
	</div>
	<div class="cl"></div>
	<div class="cr"></div>
</div><?php }} ?>